package com.example.enigmacinema;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;

public class ImgOpen extends Activity {

    private ImageView xImgView1;
    private AdView adView;
    private  String xResultado1 = "";
    private  String xResultado2 = "";
    private  String xResultado3 = "";



    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.imgopen);
        xImgView1 = (ImageView) findViewById(R.id.imageView);
        Bundle extras = getIntent().getExtras();
        int xImg = extras.getInt("img");

        switch (xImg){
            case 1:{
                xImgView1.setImageResource(R.drawable.xxxstarwars);
                xResultado1 = "starwars";
                xResultado2 = "star wars";
                break;
            }
            case 2:{
                xImgView1.setImageResource(R.drawable.xxxlabellaylabestia);
                xResultado1 = "la bella y la bestia";
                xResultado2 = "bella y la bestia";
                xResultado3 = "bella y bestia";
                break;
            }
        }




        AdRequest adRequest = new AdRequest();
        adRequest.addTestDevice(AdRequest.TEST_EMULATOR);
        adRequest.addTestDevice("4G74FC73D62D42B62A7F7DA61EF5F776");
        adView = new AdView(this, AdSize.BANNER, MainMenu.MY_PUBLISHER_ID);
        LinearLayout adlayout = (LinearLayout) findViewById(R.id.adLayoutImgOpen);
        adlayout.addView(adView);
        adView.loadAd(adRequest);
    }
}